package com.dd.ent.car.ui.adapter.general;

import android.content.Context;
import android.view.View;

import com.dd.ent.car.common.bean.graphic.Graphic;
import com.dd.ent.car.ui.adapter.ViewHolder;
import com.dd.ent.car.ui.adapter.base.BaseListAdapter;
import com.dd.ent.car.ui.home.templet.graphic.GraphicItemView;


/**
 * Created by aqu-spring on 16/8/7.
 */
public class GraphicAdapter extends BaseListAdapter<Graphic> {
    public GraphicAdapter(Callback callback) {
        super(callback);
    }

    @Override
    protected void convert(ViewHolder vh, Graphic item, int position) {

    }

    @Override
    protected void refreshData(ViewHolder vh, View view, Graphic item, int position) {
        if (view instanceof GraphicItemView){
            ( (GraphicItemView)view).refreshData(position,item);
        }
    }

    @Override
    protected int getLayoutId(int position, Graphic item) {
        return -1;
    }

    @Override
    protected View bindView(Context context, int position, Graphic item) {
        return new GraphicItemView(context);
    }
}
